package com.jsu.exhibitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.model.exhibitor.pojos.Exhibitor;
import org.example.model.exhibitor.pojos.Expert;

import java.util.List;

@Mapper
public interface ExpertMapper extends BaseMapper<Expert> {
    @Select("SELECT * FROM expert WHERE pk_id LIKE CONCAT('%', #{keyword}, '%') " +
            "OR expert_content LIKE CONCAT('%', #{keyword}, '%') " +
            "OR expert_name LIKE CONCAT('%', #{keyword}, '%')")
    List<Expert> searchExpertsByKeyword(@Param("keyword") String keyword);
}
